Vcenter Vm Guest Processes CreateSpec
The Vcenter Vm Guest Processes CreateSpec schema describes the arguments to POST /vcenter/vm/{vm}/guest/processes?action=create.
This schema was added in vSphere API 7.0.2.0.
{
"path": "string",
"arguments": "string",
"working_directory": "string",
"environment_variables": {
"environment_variables": "string"
},
"start_minimized": false
}
The absolute path to the program to start.
For Linux guest operating systems, /bin/bash is used to start the program.
For Solaris guest operating systems, if /bin/bash exists, its used to start the program, otherwise /bin/sh is used. If /bin/sh is used, then the process ID returned by POST /vcenter/vm/{vm}/guest/processes?action=create will be that of the shell used to start the program, rather than the program itself, due to the differences in how /bin/sh and /bin/bash work. This PID will still be usable for watching the process with POST /vcenter/vm/{vm}/guest/processes?action=list to find its exit code and elapsed time.
For Windows, no shell is used. Using a simple batch file instead by prepending c:\windows\system32\cmd.exe /c
will allow stdio redirection to work if passed in the arguments parameter.
This property was added in vSphere API 7.0.2.0.
The arguments to the program.
Characters which must be escaped to the shell should also be escaped in arguments.
In Linux and Solaris guest operating systems, stdio redirection arguments may be used.
For Windows, stdio redirection can be added to the argments if path is prefixed with c:\windows\system32\cmd.exe /c
.
This property was added in vSphere API 7.0.2.0.
If missing or null
no arguments are passed to the program.
The absolute path of the working directory for the program to be run. VMware recommends explicitly setting the working directory for the program to be run.
This property was added in vSphere API 7.0.2.0.
If missing or null
or is an empty string, the behavior depends on the guest operating system. For Linux guest operating systems, if missing or null
or is an empty string, the working directory will be the home directory of the user associated with the guest authentication. For other guest operating systems, if missing or null
, the behavior is unspecified.
A map of environment variables, specified using the guest OS rules (for example PATH, c:\bin;c:\windows\system32
or LD_LIBRARY_PATH,/usr/lib:/lib
), to be set for the program being run. Note that these are not additions to the default environment variables; they define the complete set available to the program.
This property was added in vSphere API 7.0.2.0.
If missing or null
, the environment variables used are guest dependent defaults.
Makes any program window start minimized in Windows operating systems. Returns an error if set for non-Windows guests.
This property was added in vSphere API 7.0.2.0.
Defaults to false.